home *** CD-ROM | disk | FTP | other *** search
- Path: hubcap.clemson.edu!hubcap!mjs
- From: mjs@hubcap.clemson.edu (M. J. Saltzman)
- Newsgroups: comp.lang.c
- Subject: Re: Settle a bet please
- Date: 3 Apr 96 19:42:36 GMT
- Organization: Clemson University
- Message-ID: <mjs.828560556@hubcap>
- References: <4jfopb$o9n@news1.sympatico.ca> <4jh8rtINNosd@mayne.ugrad.cs.ubc.ca> <4jp8li$ue@eri2.erinet.com> <828542716snz@genesis.demon.co.uk> <4jufbc$erj@eri.erinet.com>
- NNTP-Posting-Host: hubcap.clemson.edu
- X-Newsreader: NN version 6.5.0 #1
-
- timb@erinet.com (Tim Berens) writes:
-
- >Also, even though it is remotely possible that size_t is not the same
- >size as an int and that the compiler may not automatically cast it to
- >an int for the function call Or that the size of "My name" will exceed
- >32K and size_t will be a 2 byte unsigned integer, does it really
- >matter in this example? Can you name a compiler where
- >printf("size=%d",sizeof("My Name")); will not properly display
- >"size=8"?
-
- I would guess that somewhere in the world, there is an implementation
- for a big-endian architecture in which sizeof(size_t) == sizeof(long)
- and sizeof(long) > sizeof(int).
-
- I think that that would do the trick....
-
- Why not just develop the habit of doing it right in the first place?
- Otherwise, you're only asking for trouble later on.
-
-
-
-
- --
- Matthew Saltzman
- Clemson University Math Sciences
- mjs@clemson.edu
-